#include"my_stdio.h"
#include<string.h>
#include<unistd.h>

int main()
{
    MyFile* fp = MyFopen("./log.txt","a");
    if(!fp)
    {
        printf("openfile error\n");
        return 1;
    }

    int cnt = 10;
    while(cnt--)
    {
        char* msg =(char*) "hello my_stdio";
        MyFwrite(fp,msg,strlen(msg));
        MyFflush(fp);
        printf("buffer ：%s\n",fp->outbuffer);
        sleep(1);
    }
    MyFclose(fp);
    return 0;
}
